﻿namespace EasyStep.TestExecution.Data
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using EasyStep.Data.Entities;
using System.Drawing;

  
    public class TestStepResult
    {
        public TestStepResult(TestStep data)
        {
            ExecutionLog = new StringBuilder();
            StepInfo = data;             
        }
        public TestStep StepInfo { get; private set; }

        public string Locator { get { return (StepInfo==null || StepInfo.Locator == null) ? null : StepInfo.Locator.Value; } }
        public string Data { get { return (StepInfo == null || StepInfo.Data == null) ? null : StepInfo.Data.Value; } }
        public ExecutionResult Result { get; set; }

        public IEnumerable<TestStepResult> Children { get; set; }
        public TestStepResult Parent { get; set; }
                
        public string Browser { get; set; }
        public string ScreenshotFile { get; set; }
        public Image Screenshot { get; set; }

        public StringBuilder ExecutionLog { get; private set; }        
    }

}
